home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / VideoToolbox 96.06.15 / VideoToolboxSources / IsWindow.c < prev    next >
Text File  |  1996-06-13  |  424b  |  26 lines

  1. /*
  2. IsWindow.c
  3.  
  4. safely checks a suspect pointer, returning true if it points to a valid window.
  5.  
  6. HISTORY:
  7. 6/13/96 dgp wrote it.
  8. */
  9. #ifndef __LOWMEM__
  10.     #include <LowMem.h>
  11. #endif
  12. #ifndef __WINDOWS__
  13.     #include <Windows.h>
  14. #endif
  15. Boolean IsWindow(WindowPtr window);
  16.  
  17. Boolean IsWindow(WindowPtr window)
  18. {
  19.     WindowRef w=LMGetWindowList();
  20.     
  21.     while(w!=NULL){
  22.         if((WindowRef)window==w)return 1;
  23.         w=GetNextWindow(w);
  24.     }
  25.     return 0;
  26. }